package com.qys.livesMall.shop.service;


import com.qys.livesMall.common.result.R;
import com.qys.livesMall.shop.modal.dto.shop.level.ShopLevelSaveDTO;
import com.qys.livesMall.shop.modal.entity.H2ShopLevel;
import com.qys.livesMall.shop.modal.vo.ShopLevelVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author wzy
 * @since 2023-04-05
 */
public interface H2ShopLevelService {

    List<ShopLevelVO> list();

    void saveOrUpdate(ShopLevelSaveDTO saveDTO);

    R<?> delete(Integer id);

    void upgradeTask(Long userId);

    /**
     * 判断等级是否允许操作
     *
     * @param shopLevelId
     * @return 1:先付后货  2:先货后付  3:是否允许参加平台活动  4:是否允许发起任务
     */
    boolean allowOperation(Integer shopLevelId, Integer type);

    H2ShopLevel getById(Integer id);

    BigDecimal getMaxPlatformRatio();
    BigDecimal getUpgradeReward(Integer minLevel,Integer maxLevel);
    Integer getByUpgradeConditionNum(long num);


}
